package com.easygoods.shiro.token;

import com.bestvike.stone.spring.exception.AssertUtils;
import com.bestvike.stone.spring.rest.IRequest;
import com.bestvike.stone.spring.shiro.authc.AuthenticationToken;
import lombok.Data;

/**
 * Created by 许崇雷 on 2019-03-12.
 */
@Data
public final class UserToken implements AuthenticationToken, IRequest {
    private String username;
    private String password;

    @Override
    public void assertValid() {
        AssertUtils.hasText(this.username, "username");
        AssertUtils.hasText(this.password, "password");
    }
}
